#include <bits/stdc++.h>
using namespace std;

class DSU
{
private:
    vector<int> pa_;
    vector<int> size_;
public:
    DSU(/* args */);
    ~DSU();

    int Find(int x);

    void Union(int x, int y);
    void Remove();
    void Move();
};

DSU::DSU(/* args */)
{
}

DSU::~DSU()
{
}

int DSU::Find(int x)
{
    return x == pa_[x] ? x : pa_[x] = Find(pa_[x]);
}

void DSU::Union(int x, int y)
{
    x = Find(x);
    y = Find(y);
    if (x == y)
    {
        return;
    }
    else if (x < y)
    {
        pa_[x] = y;
        size_[x] += size_[y];
    }
    else
    {

    }
}

int main()
{

    return 0;
}